import request from '@/utils/request'

const {
  get: $get,
  post: $post,
  // putJson: $put,
  delete: $delete,
  download: $download
} = request


// 字典类型列表
export const getDictTypeList = data => {
  return $get('/system/dictType/list', data)
}

// 字典类型分页
export const getDictTypePage = data => {
  return $get('/system/dictType/page', data)
}

// 字典类型新增
export const addDictType = data => {
  return $post('/system/dictType/add', data)
}

// 字典类型修改
export const updateDictType = (dictId,data) => {
  return $post('/system/dictType/update/'+dictId, data)
}

// 字典类型删除
export const deleteDictType = (dictTypes) =>{
  return $post('/system/dictType/delete/'+dictTypes)
}

// 字典数据分页
export const getDictDataPage = data => {
  return $get('/system/dictData/page', data)
}

// 字典数据新增
export const addDictData = data =>{
  return $post('/system/dictData/add', data)
}

// 字典数据修改
export const updateDictData = (dictCode,data) =>{
  return $post('/system/dictData/update/'+dictCode, data)
}

// 字典数据删除
export const deleteDictData = (dictCodes,dictType) =>{
  return $post('/system/dictData/delete/'+dictCodes+"/"+dictType)
}
